package com.usian.user.controller;

import com.usian.apis.user.ApUserControllerApi;
import com.usian.model.user.pojos.ApUser;
import com.usian.user.mapper.ApUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApUserController implements ApUserControllerApi {

    @Autowired
    private ApUserMapper mapper;

    @Override
    @GetMapping("/api/v1/user/getUserId/{id}")
    public ApUser findUserById(@PathVariable Integer id) {
        if (id != null) return mapper.selectById(id);
        return null;
    }
}
